
#pragma once

#include "unit.h"
#include "CCSkeletalAnimation.h"
#include "army.h"

class Staff : public Unit {
public:
	Staff();
	virtual ~Staff();

	virtual void update(float ticks);

	void init(UnitInfo const & info, float unitScale);

	virtual void moveTo(const CCPoint& pos);

	virtual void startAttack();

public:


protected:
	virtual void handleStateBirth(float ticks);
	virtual void handleStateAim(float ticks);
	virtual void handleStateAttack(float ticks);
	virtual void handleStateDying(float ticks);
	virtual void handleStateIdle(float ticks);
	virtual void handleStateReload(float ticks);
	virtual void handleStateAssign(float ticks);
	virtual void handleStateWalk(float ticks);
	virtual void handleStateWalkAim(float ticks);
	virtual void handleStateWalkAttack(float ticks);
	virtual void handleStateWalkReload(float ticks);

	virtual void onEnterState(UnitState theState);

	virtual void onAttack();

	void createSkyFallBullet(Army *targetArmy, DamageType damageType);
	void createFullCoverBullet(Army *army1, Army *army2, DamageType damageType);
};